package jumpingnotes.model.entity;

// Generated Oct 10, 2008 9:37:27 PM by Hibernate Tools 3.2.1.GA

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * BookExpect generated by hbm2java
 */
@Entity
@Table(name = "book_expect", catalog = "jumping_notes")
public class BookExpect implements java.io.Serializable
{

	private Integer bookExpectId;
	private Book book;
	private Member member;
	private String reason;
	private Date createTime;

	public BookExpect()
	{
	}

	public BookExpect(Book book, Member member, Date createTime)
	{
		this.book = book;
		this.member = member;
		this.createTime = createTime;
	}

	public BookExpect(Book book, Member member, String reason, Date createTime)
	{
		this.book = book;
		this.member = member;
		this.reason = reason;
		this.createTime = createTime;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "book_expect_id", unique = true, nullable = false)
	public Integer getBookExpectId()
	{
		return this.bookExpectId;
	}

	public void setBookExpectId(Integer bookExpectId)
	{
		this.bookExpectId = bookExpectId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "book_id", nullable = false)
	public Book getBook()
	{
		return this.book;
	}

	public void setBook(Book book)
	{
		this.book = book;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "member_id", nullable = false)
	public Member getMember()
	{
		return this.member;
	}

	public void setMember(Member member)
	{
		this.member = member;
	}

	@Column(name = "reason", length = 65535)
	public String getReason()
	{
		return this.reason;
	}

	public void setReason(String reason)
	{
		this.reason = reason;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "create_time", nullable = false, length = 19)
	public Date getCreateTime()
	{
		return this.createTime;
	}

	public void setCreateTime(Date createTime)
	{
		this.createTime = createTime;
	}

}
